import React, { Component } from 'react';

class HelloComponent extends Component {

  constructor(props) {
    super(props);
    this.state = {  }
  }

  //5.卸载过程：组件从DOM树中被移除时调用
  componentWillUnmount() {
    console.log("Hello - componentWillUnmount");
  }

  render() { 
    return ( 
      <h2>Hello Component</h2>
     );
  }
}
 
export default HelloComponent;